{include 'header.tpl'}
<body>
<div class="contant  myorder">
    <div class="header">
        <div class="header_s">
            <span class="back"><a href="javascript:window.history.go(-1);" ><i class="iconfont fan">
                        &#xe679;</i></a></span>
            <span class="title">我的订单</span>
            <span class="add_ads">&nbsp;</span>

            <div class="clear"></div>
        </div>
    </div>

    <div id="list_order" class="list_order">
        {if $order_list}
            {foreach from=$order_list item=order name=foo}
        <div class="orderlist">
            <span>下单时间：{$order.create_time}<label>￥{$order.pay_price}</label>	</span>
            <ul>
                {foreach from=$order.products item=product name=foo}
                    <li>
                        <a  href="/order/detail?oid={$order.o_id}">
                            <span><img src="{{Service_Attach::getInstance()->getThumbUrl($product.img2,150,150)}}"/></span>

                            <label>
                                <div class="table">
                                    <div class="line1"> {$product.title}</div>
                                    <div class="line2"><span>￥{$product.price_new}</span></div>
                                    <div class="line3">
                                        <div>数量<span>{$product.paynum}</span></div>
                                    </div>
                                </div>
                            </label>
                        </a>
                    </li>
                {/foreach}
            </ul>
            <label>
                <span class="orderStatus">{$order.status_name}</span>
                {if $order.status == 1}
                    <a class="btn fr white" href="/pay/wx?oid={$order.auto_id}" >立即支付</a>
                    <a class="btn fr white" style=" color:#999; border: 1px #999 solid;" href="/order/cancel?oid={$order.o_id}" >取消订单</a>
                {/if}
                {if $order.status == 5}
                    <a class="btn fr white" href="/order/again?oid={$order.o_id}" >再来一单</a>
                {/if}
            </label>
        </div>
            {/foreach}
        {else}
        <div class="orderlist">
            <span>还没有下单，快去下单吧</span>
        </div>
        {/if}
    </div>


</div>
{include 'footer.tpl'}